<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta charset="UTF-8">
  <title><?= empty($this->pageTitle) ? Yii::app()->name : $this->pageTitle ?></title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="/public/lib/bootstrap/dist/css/bootstrap.min.css">
  <link rel="stylesheet" href="/public/lib/font-awesome-4.0.3/css/font-awesome.min.css">
  <link rel="stylesheet" href="/public/css/admin.css">
  <script src="/public/lib/jquery/jquery.min.js"></script>
  <script src="/public/lib/bootstrap/dist/js/bootstrap.min.js"></script>
  <script src="/public/lib/jquery/jquery.form.js"></script>
  <script src="/public/js/main.js"></script>
  <script src="/public/js/manage.js"></script>
  <script>
    $(function () {
      $(".menu ul.nav li>ul.nav").hide();
      $(document).on("click", ".menu>.nav>li>a", function () {
        if (!$(this).is(":animated")) {
          $(this).next().toggle("fast").parent().siblings("li").find(".nav").slideUp("fast");
          $(this).find(".arrow i").toggleClass("fa-angle-down");
          $(this).next().parent().siblings("li").find(".arrow i").removeClass("fa-angle-down");
        }
      });
    });
  </script>
</head>
<body>
<header class="navbar navbar-inverse navbar-fixed-top" role="banner">
  <div class="container">
    <div class="navbar-header">
      <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".navbar-collapse">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a href="/" target="_blank" class="navbar-brand"><?= Yii::app()->name ?> <span class="label label-info">教师</span></a>
    </div>
    <nav class="collapse navbar-collapse" role="navigation">
      <ul class="nav navbar-nav navbar-right">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">
            <i class="fa fa-user"></i>
          </a>
          <ul class="dropdown-menu" role="menu">
            <li><a href="#" data-toggle="modal" data-target="#password-modal"><i class="fa fa-lock"></i> 修改密码</a></li>
            <li><a href="<?= Yii::app()->createUrl('teacher/logout') ?>"><i class="fa fa-power-off"></i> 退出登录</a></li>
          </ul>
        </li>
      </ul>
    </nav>
  </div>
</header>
<div class="container content">
  <section class="menu pull-left">
    <ul class="nav">
      <li><a href="<?=Yii::app()->createUrl('teacher/lesson')?>">
          <i class="fa fa-book"></i>
          <span class="title">课程管理</span>
        </a>
      </li>
      <li><a href="#">
          <i class="fa fa-question"></i>
          <span class="title">题库管理</span>
          <span class="arrow"><i class="fa fa-angle-left"></i></span>
        </a>
        <ul class="nav">
          <li><a href="<?= Yii::app()->createUrl('teacher/question_bank') ?>">试题列表</a></li>
        </ul>
      </li>
      <li><a href="#">
          <i class="fa fa-code-fork"></i>
          <span class="title">在线答疑</span>
          <span class="arrow"><i class="fa fa-angle-left"></i></span>
        </a>
        <ul class="nav">
          <li><a href="<?= Yii::app()->createUrl('teacher/reply') ?>">我的回答</a></li>
        </ul>
      </li>
      <li><a href="#">
          <i class="fa fa-comments"></i>
          <span class="title">在线讨论</span>
          <span class="arrow"><i class="fa fa-angle-left"></i></span>
        </a>
        <ul class="nav">
          <li><a href="<?= Yii::app()->createUrl('teacher/topic') ?>">我的主题</a></li>
          <li><a href="<?= Yii::app()->createUrl('teacher/thread') ?>">我的回复</a></li>
        </ul>
      </li>
    </ul>
  </section>
  <section class="content pull-right">
    <?= $content ?>
  </section>
</div>
<footer class="text-center navbar-fixed-bottom">
  Copyright &copy; 2013 - 2014 推荐分辨率 1280*720
</footer>

<!-- Modal -->
<div class="modal fade" id="password-modal" tabindex="-1" role="dialog" aria-labelledby="modal-title" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <form action="<?=Yii::app()->createUrl('user/password')?>" method="post" class="form-horizontal" data-password="true">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
          <h4 class="modal-title" id="modal-title">修改密码</h4>
        </div>
        <div class="modal-body">
          <div class="form-group">
            <label for="password" class="control-label col-md-2">密码</label>
            <div class="col-md-6">
              <input type="password" name="password" id="password" class="form-control" required="">
            </div>
          </div>
          <div class="form-group">
            <label for="repassword" class="control-label col-md-2">确认密码</label>
            <div class="col-md-6">
              <input type="password" name="repassword" id="repassword" class="form-control" required="">
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <button type="submit" class="btn btn-primary">确定</button>
          <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        </div>
      </form>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script>
  initPassword();
</script>
</body>
</html>